package com.wolf.repository;

import com.wolf.pojo.Wl_activity_commodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface Wl_activity_commodityMapper {
    int deleteByPrimaryKey(String id);

    int insert(Wl_activity_commodity record);

    int insertSelective(Wl_activity_commodity record);

    Wl_activity_commodity selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Wl_activity_commodity record);

    int updateByPrimaryKey(Wl_activity_commodity record);

    /**
     * 查询所有 两表联查Wl_activity_commodity与Wl_commodity
     * @return
     */
    List<Wl_activity_commodity> getAll();

    /**
     * 查询是否包邮
     */
    List<Wl_activity_commodity> getByhasFreight();

    /**
     * 查询活动类型
     */
    List<Wl_activity_commodity> getByType();

    /**
     * 查询活动状态
     */
    List<Wl_activity_commodity> getByStatus();

    /**
     * 模糊查询
     * @return
     */
    List<Wl_activity_commodity> fuzzyQuery(@Param("hasfreight")Integer hasfreight,@Param("type")Integer type,@Param("status")Integer status,@Param("starttime")String starttime,@Param("expiredtime")String expiredtime);

    /**
     * 根据id查询
     */
    Wl_activity_commodity getById(@Param("id")String id);

    /**
     * 删除
     */
    int remove(@Param("id")String id);
}